/**
 * 数组去重
 * @param vals 数组
 * @example remove_duplicate(vals);
 */
export default function remove_duplicate<T>(vals: T[]) {
	const m = new Map();
	vals.forEach((v) => {
		m.set(JSON.stringify(v), v);
	});
	return Array.from(m.values());
}
